<?php

namespace App\Services\Scenic;


use App\Services\Scenic\Query\LocalQueryFactory;
use App\Services\Scenic\Query\ScenicQueryFactoryInterface;
use App\Services\Scenic\Query\TuniuQueryFactory;
use App\Trip\Enums\Scenic\ScenicProvider;

/**
 * 供应商航班查询工厂
 */
class ScenicQueryFactory
{
    public function __construct() {}

    public function LocalQuery(): LocalQueryFactory
    {
        return new LocalQueryFactory();
    }

    public function TuniuQuery(): TuniuQueryFactory
    {
        return new TuniuQueryFactory();
    }

    public function findOneByProvider(ScenicProvider $provider): ScenicQueryFactoryInterface
    {
        return $provider->getScenicQueryStrategy();
    }
}